<template>
    <div class="one" style="width:1030px;margin:0 auto">
        <el-main id="main" style="text-align:left">
            <h2 style="text-align:center">民间非营利组织主要经济指标</h2>
            <div style="text-align:right">
                <p>表号：711—4表</p>
                <p>制定机关：国家统计局国务院经济普查办公室</p>
                <p>文号：国统字（2018）号</p>
                <p>有效期至：2019年6月</p>
            </div>
            <div>
                <p>组织机构代码:&nbsp;{{organizationCode}}</p>
                <p>统一社会信用代码:&nbsp;{{socialCreditCode}}</p>
                <p>单位详细名称:&nbsp;{{unitDetailedName}}</p>
            </div>
             <el-form ref="form" :rules="rules" :model="form"   style="text-align:left">
                     <p style="text-align:center"><b>一、主要经济指标</b></p>
                    <table style="text-align:center;margin-top:5px;">
                        <thead>
                            <tr>
                                <th class="bian" style="width:450px;text-align:center">指标名称</th>
                                <th class="bian" style="width:200px;text-align:center" >计量单位</th>
                                <th class="bian" style="width:100px;text-align:center">代码</th>
                                <th class="bian" style="width:200px;text-align:center">本年</th>
                                <th class="doubling" style="width:450px;text-align:center">指标名称</th>
                                <th class="bian" style="width:200px;text-align:center" >计量单位</th>
                                <th class="bian" style="width:100px;text-align:center">代码</th>
                                <th  style="width:200px;text-align:center">本年</th>
                            </tr>
                        </thead>
                        <tbody >
                            <tr>
                                <td class="bian">甲</td>
                                <td class="bian">乙</td>
                                <td class="bian">丙</td>
                                <td class="bian">1</td>
                                <td class="doubling" style="text-align:center">甲</td>
                                <td class="bian">乙</td>
                                <td class="bian">丙</td>
                                <td>1</td>
                            </tr>
                            <tr>
                                <td class="bbb">流动资产合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">01</td>
                                <td class="bian">
                                    <el-form-item prop="totalCurrentAssets">
                                        <input type="text" name="" v-model="form.totalCurrentAssets"  @keyup="testMoney(form.totalCurrentAssets,'totalCurrentAssets')">
                                        <div class="red" v-show="saveData.totalCurrentAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">本年收入合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">15</td>
                                <td>
                                    <el-form-item prop="totalIncome">
                                        <input type="text" name="" v-model="form.totalIncome"  @keyup="testMoney(form.totalIncome,'totalIncome')">
                                        <div class="red" v-show="saveData.totalIncome">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;其中：存货</td>
                                <td class="bian">千元</td>
                                <td class="bian">02</td>
                                <td class="bian">
                                    <el-form-item prop="stock">
                                        <input type="text" name="" v-model="form.stock"  @keyup="testMoney(form.stock,'stock')">
                                        <div class="red" v-show="saveData.stock">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;捐赠收入</td>
                                <td class="bian">千元</td>
                                <td class="bian">16</td>
                                <td>
                                    <el-form-item prop="donationIncome">
                                        <input type="text" name="" v-model="form.donationIncome"  @keyup="testMoney(form.donationIncome,'donationIncome')">
                                        <div class="red" v-show="saveData.donationIncome">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">长期投资</td>
                                <td class="bian">千元</td>
                                <td class="bian">03</td>
                                <td class="bian">
                                    <el-form-item prop="longTermInvestment">
                                        <input type="text" name="" v-model="form.longTermInvestment"  @keyup="testMoney(form.longTermInvestment,'longTermInvestment')">
                                        <div class="red" v-show="saveData.longTermInvestment">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;会费收入</td>
                                <td class="bian">千元</td>
                                <td class="bian">17</td>
                                <td>
                                    <el-form-item prop="feeIncome">
                                        <input type="text" name="" v-model="form.feeIncome"  @keyup="testMoney(form.feeIncome,'feeIncome')">
                                        <div class="red" v-show="saveData.feeIncome">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">固定资产原价</td>
                                <td class="bian">千元</td>
                                <td class="bian">04</td>
                                <td class="bian">
                                    <el-form-item prop="fixedAssets">
                                        <input type="text" name="" v-model="form.fixedAssets"  @keyup="testMoney(form.fixedAssets,'fixedAssets')">
                                        <div class="red" v-show="saveData.fixedAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">本年费用合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">18</td>
                                <td>
                                    <el-form-item prop="totalExpenditure">
                                        <input type="text" name="" v-model="form.totalExpenditure"  @keyup="testMoney(form.totalExpenditure,'totalExpenditure')">
                                        <div class="red" v-show="saveData.totalExpenditure">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中：房屋和构筑物</td>
                                <td class="bian">千元</td>
                                <td class="bian">05</td>
                                <td class="bian">
                                     <el-form-item prop="housesStructures">
                                        <input type="text" name="" v-model="form.housesStructures"  @keyup="testMoney(form.housesStructures,'housesStructures')">
                                        <div class="red" v-show="saveData.housesStructures">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;业务活动成本</td>
                                <td class="bian">千元</td>
                                <td class="bian">19</td>
                                <td>
                                    <el-form-item prop="businessActivityCost">
                                        <input type="text" name="" v-model="form.businessActivityCost"  @keyup="testMoney(form.businessActivityCost,'businessActivityCost')">
                                        <div class="red" v-show="saveData.businessActivityCost">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机器设备</td>
                                <td class="bian">千元</td>
                                <td class="bian">06</td>
                                <td class="bian">
                                    <el-form-item prop="machineryEquipment">
                                        <input type="text" name="" v-model="form.machineryEquipment"  @keyup="testMoney(form.machineryEquipment,'machineryEquipment')">
                                        <div class="red" v-show="saveData.machineryEquipment">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;人员费用</td>
                                <td class="bian">千元</td>
                                <td class="bian">20</td>
                                <td>
                                    <el-form-item prop="activityPersonnelCosts">
                                        <input type="text" name="" v-model="form.activityPersonnelCosts"  @keyup="testMoney(form.activityPersonnelCosts,'activityPersonnelCosts')">
                                        <div class="red" v-show="saveData.activityPersonnelCosts">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;运输工具</td>
                                <td class="bian">千元</td>
                                <td class="bian">07</td>
                                <td class="bian">
                                    <el-form-item prop="conveyance">
                                        <input type="text" name="" v-model="form.conveyance"  @keyup="testMoney(form.conveyance,'conveyance')">
                                        <div class="red" v-show="saveData.conveyance">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日常费用</td>
                                <td class="bian">千元</td>
                                <td class="bian">21</td>
                                <td>
                                    <el-form-item prop="activityDailyExpenses">
                                        <input type="text" name="" v-model="form.activityDailyExpenses"  @keyup="testMoney(form.activityDailyExpenses,'activityDailyExpenses')">
                                        <div class="red" v-show="saveData.activityDailyExpenses">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;电子设备</td>
                                <td class="bian">千元</td>
                                <td class="bian">08</td>
                                <td class="bian">
                                    <el-form-item prop="electronicEquipment">
                                        <input type="text" name="" v-model="form.electronicEquipment"  @keyup="testMoney(form.electronicEquipment,'electronicEquipment')">
                                        <div class="red" v-show="saveData.electronicEquipment">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;固定资产折旧</td>
                                <td class="bian">千元</td>
                                <td class="bian">22</td>
                                <td>
                                    <el-form-item prop="activityFixedAssetsDepreciation">
                                        <input type="text" name="" v-model="form.activityFixedAssetsDepreciation"  @keyup="testMoney(form.activityFixedAssetsDepreciation,'activityFixedAssetsDepreciation')">
                                        <div class="red" v-show="saveData.activityFixedAssetsDepreciation">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">在建工程</td>
                                <td class="bian">千元</td>
                                <td class="bian">212</td>
                                <td class="bian">
                                    <el-form-item prop="constructionProject">
                                        <input type="text" name="" v-model="form.constructionProject"  @keyup="testMoney(form.constructionProject,'constructionProject')">
                                        <div class="red" v-show="saveData.constructionProject">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;税费</td>
                                <td class="bian">千元</td>
                                <td class="bian">23</td>
                                <td>
                                    <el-form-item prop="activityTaxation">
                                        <input type="text" name="" v-model="form.activityTaxation"  @keyup="testMoney(form.activityTaxation,'activityTaxation')">
                                        <div class="red" v-show="saveData.activityTaxation">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">文物文化资产</td>
                                <td class="bian">千元</td>
                                <td class="bian">10</td>
                                <td class="bian">
                                    <el-form-item prop="culturalRelics">
                                        <input type="text" name="" v-model="form.culturalRelics"  @keyup="testMoney(form.culturalRelics,'culturalRelics')">
                                        <div class="red" v-show="saveData.culturalRelics">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;管理费用</td>
                                <td class="bian">千元</td>
                                <td class="bian">24</td>
                                <td>
                                    <el-form-item prop="managementCost">
                                        <input type="text" name="" v-model="form.managementCost"  @keyup="testMoney(form.managementCost,'managementCost')">
                                        <div class="red" v-show="saveData.managementCost">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">无形资产</td>
                                <td class="bian">千元</td>
                                <td class="bian">11</td>
                                <td class="bian">
                                    <el-form-item prop="intangibleAssets">
                                        <input type="text" name="" v-model="form.intangibleAssets"  @keyup="testMoney(form.intangibleAssets,'intangibleAssets')">
                                        <div class="red" v-show="saveData.intangibleAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;人员费用</td>
                                <td class="bian">千元</td>
                                <td class="bian">25</td>
                                <td>
                                    <el-form-item prop="managementPersonnelCosts">
                                        <input type="text" name="" v-model="form.managementPersonnelCosts"  @keyup="testMoney(form.managementPersonnelCosts,'managementPersonnelCosts')">
                                        <div class="red" v-show="saveData.managementPersonnelCosts">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                            <tr>
                                <td class="bbb">资产总计</td>
                                <td class="bian">千元</td>
                                <td class="bian">12</td>
                                <td class="bian">
                                     <el-form-item prop="totalAssets">
                                        <input type="text" name="" v-model="form.totalAssets"  @keyup="testMoney(form.totalAssets,'totalAssets')">
                                        <div class="red" v-show="saveData.totalAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日常费用</td>
                                <td class="bian">千元</td>
                                <td class="bian">26</td>
                                <td>
                                    <el-form-item prop="managementDailyExpenses">
                                        <input type="text" name="" v-model="form.managementDailyExpenses"  @keyup="testMoney(form.managementDailyExpenses,'managementDailyExpenses')">
                                        <div class="red" v-show="saveData.managementDailyExpenses">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                             <tr>
                                <td class="bbb">负债合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">13</td>
                                <td class="bian">
                                    <el-form-item prop="totalDebt">
                                        <input type="text" name="" v-model="form.totalDebt"  @keyup="testMoney(form.totalDebt,'totalDebt')">
                                        <div class="red" v-show="saveData.totalDebt">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;固定资产折旧</td>
                                <td class="bian">千元</td>
                                <td class="bian">27</td>
                                <td>
                                    <el-form-item prop="managementFixedAssetsDepreciation">
                                        <input type="text" name="" v-model="form.managementFixedAssetsDepreciation"  @keyup="testMoney(form.managementFixedAssetsDepreciation,'managementFixedAssetsDepreciation')">
                                        <div class="red" v-show="saveData.managementFixedAssetsDepreciation">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                             <tr>
                                <td class="bbb">净资产合计</td>
                                <td class="bian">千元</td>
                                <td class="bian">14</td>
                                <td class="bian">
                                    <el-form-item prop="totalNetAssets">
                                        <input type="text" name="" v-model="form.totalNetAssets"  @keyup="testMoney(form.totalNetAssets,'totalNetAssets')">
                                        <div class="red" v-show="saveData.totalNetAssets">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                                <td class="doubling">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;税费</td>
                                <td class="bian">千元</td>
                                <td class="bian">28</td>
                                <td>
                                    <el-form-item prop="managementTaxation">
                                        <input type="text" name="" v-model="form.managementTaxation"  @keyup="testMoney(form.managementTaxation,'managementTaxation')">
                                        <div class="red" v-show="saveData.managementTaxation">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                             <tr>
                                <td class="bbb"></td>
                                <td class="bian"></td>
                                <td class="bian"></td>
                                <td class="bian"></td>
                                <td class="doubling">净资产变动额</td>
                                <td class="bian">千元</td>
                                <td class="bian">29</td>
                                <td>
                                    <el-form-item prop="netAssetChange">
                                        <input type="text" name="" v-model="form.netAssetChange"  @keyup="testMoney(form.netAssetChange,'netAssetChange')">
                                        <div class="red" v-show="saveData.netAssetChange">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item> 
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <p style="text-align:center"><b>二、从业人员及工资总额</b></p>
                    <table style="text-align:center;margin-top:5px;">
                        <thead>
                            <tr>
                                <th class="bian" style="width:400px;text-align:center">指标名称</th>
                                <th class="bian" style="width:200px;text-align:center">计量单位</th>
                                <th  class="bian" style="width:100px;text-align:center">代码</th>
                                <th  style="width:300px;text-align:center">本年</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td class="bian">甲</td>
                                <td class="bian">乙</td>
                                <td class="bian">丙</td>
                                <td >1</td>
                            </tr>
                            <tr>
                                <td class="bian">一、从业人员</td>
                                <td class="bian">-</td>
                                <td class="bian">-</td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从业人员期末人数</td>
                                <td class="bian">人</td>
                                <td class="bian">01</td>
                                <td>
                                    <el-form-item prop="finalEmployeesNumber">
                                        <input type="text" name="" v-model="form.finalEmployeesNumber"  @keyup="testPeople(form.finalEmployeesNumber,'finalEmployeesNumber')">
                                        <div class="red" v-show="saveData.finalEmployeesNumber">请输入正整数</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;其中:女性</td>
                                <td class="bian">人</td>
                                <td class="bian">02</td>
                                <td>
                                    <el-form-item prop="femaleNumber">
                                        <input type="text" name="" v-model="form.femaleNumber"  @keyup="testPeople(form.femaleNumber,'femaleNumber')">
                                        <div class="red" v-show="saveData.femaleNumber">请输入正整数</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从业人员平均人数</td>
                                <td class="bian">人</td>
                                <td class="bian">03</td>
                                <td>
                                    <el-form-item prop="averageEmployeesNumber">
                                        <input type="text" name="" v-model="form.averageEmployeesNumber"  @keyup="testPeople(form.averageEmployeesNumber,'averageEmployeesNumber')">
                                        <div class="red" v-show="saveData.averageEmployeesNumber">请输入正整数</div>
                                    </el-form-item>
                                </td>
                            </tr>
                            <tr>
                                <td class="bian">二、工资总额</td>
                                <td class="bian">-</td>
                                <td class="bian">-</td>
                                <td></td>
                            </tr>
                            <tr>
                                <td class="bian">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;从业人员工资总额</td>
                                <td class="bian">千元</td>
                                <td class="bian">04</td>
                                <td>
                                    <el-form-item prop="totalWages">
                                        <input type="text" name="" v-model="form.totalWages"  @keyup="testMoney(form.totalWages,'totalWages')" @blur="testReason(form.totalWages)">
                                        <div class="red" v-show="saveData.totalWages">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <div v-show="totalReason">
                <h4>补充资料：</h4>  
                  <el-form-item prop="reason">
                    <p>&nbsp;&nbsp;1.无法填报“从业人员工资总额”数据的原因：</p> 
                    <el-radio-group v-model="form.reason" @change="sourceFilter">
                        <el-radio :label="1" name="reason"  style="margin-left:30px;">（1）本单位无生产经营活动。</el-radio><br>
                        <el-radio :label="2" name="reason" style="margin-left:30px;">（2）本单位不独立核算，工资有上级单位发放。</el-radio><br>
                        <el-radio :label="3" name="reason" style="margin-left:30px;">（3）本单位一套人马多块牌子，工资已在另一家单位统计。</el-radio><br>
                        <el-radio :label="4" name="reason" style="margin-left:30px;">（4）本单位属于单位内部性组织、互助性组织或非经营性组织，没有工资发放。</el-radio><br>
                        <el-radio :label="5" name="reason" style="margin-left:30px;">（5）本单位为没有雇员的家庭经营单位，没有工资发放。</el-radio><br>
                        <el-radio :label="6" name="reason" style="margin-left:30px;">（6）其他原因</el-radio>
                    </el-radio-group>
                    <div class="red" v-show="saveData.reason">请选择无法填报“从业人员工资总额”数据的原因</div>
                </el-form-item>
                <div  v-show="one">
                        <p>&nbsp;&nbsp;2.原因为(2)、(3)的单位填报</p>
                    <el-form-item prop="upOrganizationCode"> 
                        发放工资的法人单位：&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;组织机构代码：<el-input  class="width400" v-model="form.upOrganizationCode" @keyup.native="testEln(form.upOrganizationCode,'upOrganizationCode')"></el-input>
                    <div style="margin-left:270px;" class="red" v-show="saveData.upOrganizationCode">请输入数字或英文</div>
                    <div style="margin-left:270px;" class="red" v-show="showupSocialCreditCode">请输入统一社会信用代码或组织机构代码至少一项</div> 
                    </el-form-item> 
                    <el-form-item prop="upSocialCreditCode">
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        统一社会信用代码： <el-input  class="width400" v-model="form.upSocialCreditCode" @keyup.native="testEln(form.upSocialCreditCode,'upSocialCreditCode')"></el-input>    
                    <div style="margin-left:270px;" class="red" v-show="saveData.upSocialCreditCode">请输入数字或英文</div>
                        <div style="margin-left:270px;" class="red" v-show="showupSocialCreditCode">请输入统一社会信用代码或组织机构代码至少一项</div>
                    </el-form-item>
                    <el-form-item prop="upUnitDetailedName">
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
                        单位详细名称：<el-input class="width400" v-model="form.upUnitDetailedName" ></el-input>    
                    <div style="margin-left:270px;" class="red" v-show="saveData.upUnitDetailedName">请输入汉字或英文</div>
                        <div style="margin-left:270px;" class="red" v-show="showupUnitDetailedName">请输入单位详细名称</div> 
                    </el-form-item>
                </div>
                    </div>
                <el-form-item>
                    <p style="text-align:center"><b>三、从业人员及工资总额</b></p>
                    <table style="text-align:center;margin-top:5px;">
                        <thead>
                             <tr>
                                <th class="bian" style="width:400px;text-align:center">指标名称</th>
                                <th class="bian" style="width:200px;text-align:center">计量单位</th>
                                <th  class="bian" style="width:100px;text-align:center">代码</th>
                                <th  style="width:300px;text-align:center">本年</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td class="bian">甲</td>
                                <td class="bian">乙</td>
                                <td class="bian">丙</td>
                                <td >1</td>
                            </tr>
                             <tr>
                                <td class="bian">电子商务采购额</td>
                                <td class="bian">千元</td>
                                <td class="bian">01</td>
                                <td>
                                    <el-form-item prop="eBusinessProcurement">
                                        <input type="text" name="" v-model="form.eBusinessProcurement"  @keyup="testMoney(form.eBusinessProcurement,'eBusinessProcurement')">
                                        <div class="red" v-show="saveData.eBusinessProcurement">请输入小数点后5位至小数点前20位之间的数字</div>
                                    </el-form-item>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </el-form-item>
                <el-form-item>
                    <span style="font-size:8px">单位负责人：</span>
                    <el-input style="width:100px" v-model="form.unitHead"></el-input>
                    <span style="font-size:8px">统计负责人：</span>
                    <el-input style="width:100px" v-model="form.statisticalControlOfficer"></el-input>
                    <span style="font-size:8px">填表人：</span>
                    <el-input style="width:100px" v-model="form.fillFormBy"></el-input>
                    <span style="font-size:8px">联系电话：</span>
                    <el-input style="width:120px" v-model="form.phone"></el-input>
                    <span style="font-size:8px">出报日期：</span>
                    <el-date-picker  v-model="form.createTime" class="width100 marginBottom"    type="date"  placeholder="选择日期"> </el-date-picker>
                </el-form-item>
                <el-form-item>
                    <div>
                        <p>说明：1.统计范围：辖区内执行行政单位、事业单位会计制度和其他会计制度的法人单位。</p>
                        <p>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;2.报送日期及方式：2019年4月30日前通过非一套表单位采集处理软件或手持电子终端设备采集数据。</p>
                        <p>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;3.审核关系：</p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            资产负债:
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （1）固定资产净值=房屋和构筑物（净值）+机器设备（净值）+运输工具（净值）+电子设备（净值）+其他（净值）
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （2）固定资产原价=房屋和构筑物（原价）+机器设备（原价）+运输工具（原价）+电子设备（原价）+其他（原价）
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （3）无形资产净值=土地使用权+软件使用权+其他
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （4）净资产合计=资产合计-负债合计
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            财务状况:
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （1）本年收入合计≥财政拨款+事业收入+经营收入
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （2）本年费用合计≥业务活动成本+管理费用
                        </p>
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （3）业务活动成本≥人员费用+日常费用+固定资产折旧+税费
                        <p>
                            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
                            （4）管理费用≥人员费用+日常费用+固定资产折旧+税费
                        </p>
                    </div>
                </el-form-item>
            </el-form>
        </el-main>
        <div slot="footer" class="dialog-footer"> 
            <el-button type="primary" @click="submitFormfour('form')">提交</el-button> 
            <el-button type="primary" @click="saveFormfour">暂存</el-button> 
            <el-button type="danger" @click="download">下载PDF表格</el-button>
        </div>
    </div>
</template>
<script>
import axios from 'axios';
import { log } from 'util';
  
export default {
     name:'App',
    data(){
        return{
            organizationCode:this.$store.get("organizationCode"),//组织机构代码
            socialCreditCode:this.$store.get("socialCreditCode"),//统一社会信用代码
            unitDetailedName:this.$store.get("unitDetailedName"),//单位详细名称
            id:null,
            one:false,
            totalReason:true,//不填写总额原因
            showupUnitDetailedName:false,
            showupSocialCreditCode:false,
            form:{
                totalCurrentAssets:'',//(01)流动资产合计 千元
                stock:'',//(02)其中：存货 千元
                longTermInvestment:'',//(03)长期投资 千元
                fixedAssets:'',//(04)固定资产原价 千元
                housesStructures:'',//(05)其中：房屋和构筑物 千元
                machineryEquipment:'',//(06)机器设备 千元
                conveyance:'',//(07)运输工具 千元
                electronicEquipment:'',//(08)电子设备 千元
                constructionProject:'',//(212)在建工程 千元
                culturalRelics:'',//(10)文物文化资产 千元
                intangibleAssets:'',//(11)无形资产原价 千元
                totalAssets:'',//(12)资产总计 千元
                totalDebt:'',//(13)负债合计 千元
                totalNetAssets:'',//(14)净资产合计 千元
                totalIncome:'',//(15)本年收入合计 千元
                donationIncome:'',//(16)捐赠收入 千元
                feeIncome:'',//(17)会费收入 千元
                totalExpenditure:'',//(18)本年费用合计 千元
                businessActivityCost:'',//(19)业务活动成本 千元
                activityPersonnelCosts:'',//(20)人员费用 千元
                activityDailyExpenses:'',//(21)日常费用 千元
                activityFixedAssetsDepreciation:'',//(22)固定资产折旧 千元
                activityTaxation:'',//(23)税费 千元
                managementCost:'',//(24)管理费用 千元
                managementPersonnelCosts:'',//(25)人员费用 千元
                managementDailyExpenses:'',//(26)日常费用 千元
                managementFixedAssetsDepreciation:'',//(27)固定资产折旧 千元'
                managementTaxation:'',//(28)税费 千元
                netAssetChange:'',//(29)净资产变动额千元




                finalEmployeesNumber:'',//(01)从业人员期末人数
                femaleNumber:'',//(02)其中：女性人数
                averageEmployeesNumber:'',//(03)从业人员平均人数
                totalWages:'',//(04)从业人员工资总额
                reason:'',//1.无法填报“从业人员工资总额”数据的原因
                upOrganizationCode:'',//组织机构代码  发放工资的法人单位
                upSocialCreditCode:'',//统一社会信用代码 发放工资的法人单位
                upUnitDetailedName:'',//单位详细名称 发放工资的法人单位

                eBusinessProcurement:'',//(01)电子商务采购额  千元
                


                unitHead:'',//单位负责人
                statisticalControlOfficer:'',//统计负责人
                fillFormBy:'',//填表人
                phone:'',//联系电话
                createTime:'',//填表时间
            },
              saveData:{
                totalCurrentAssets:false,//(01)流动资产合计 千元
                stock:false,//(02)其中：存货 千元
                longTermInvestment:false,//(03)长期投资 千元
                fixedAssets:false,//(04)固定资产原价 千元
                housesStructures:false,//(05)其中：房屋和构筑物 千元
                machineryEquipment:false,//(06)机器设备 千元
                conveyance:false,//(07)运输工具 千元
                electronicEquipment:false,//(08)电子设备 千元
                constructionProject:false,//(212)在建工程 千元
                culturalRelics:false,//(10)文物文化资产 千元
                intangibleAssets:false,//(11)无形资产原价 千元
                totalAssets:false,//(12)资产总计 千元
                totalDebt:false,//(13)负债合计 千元
                totalNetAssets:false,//(14)净资产合计 千元
                totalIncome:false,//(15)本年收入合计 千元
                donationIncome:false,//(16)捐赠收入 千元
                feeIncome:false,//(17)会费收入 千元
                totalExpenditure:false,//(18)本年费用合计 千元
                businessActivityCost:false,//(19)业务活动成本 千元
                activityPersonnelCosts:false,//(20)人员费用 千元
                activityDailyExpenses:false,//(21)日常费用 千元
                activityFixedAssetsDepreciation:false,//(22)固定资产折旧 千元
                activityTaxation:false,//(23)税费 千元
                managementCost:false,//(24)管理费用 千元
                managementPersonnelCosts:false,//(25)人员费用 千元
                managementDailyExpenses:false,//(26)日常费用 千元
                managementFixedAssetsDepreciation:false,//(27)固定资产折旧 千元'
                managementTaxation:false,//(28)税费 千元
                netAssetChange:false,//(29)净资产变动额千元




                finalEmployeesNumber:false,//(01)从业人员期末人数
                femaleNumber:false,//(02)其中：女性人数
                averageEmployeesNumber:false,//(03)从业人员平均人数
                totalWages:false,//(04)从业人员工资总额
                reason:false,//1.无法填报“从业人员工资总额”数据的原因
                upOrganizationCode:false,//组织机构代码  发放工资的法人单位
                upSocialCreditCode:false,//统一社会信用代码 发放工资的法人单位
                upUnitDetailedName:false,//单位详细名称 发放工资的法人单位

                eBusinessProcurement:false,//(01)电子商务采购额  千元
                


                // unitHead:false,//单位负责人
                // statisticalControlOfficer:false,//统计负责人
                // fillFormBy:false,//填表人
                // phone:false,//联系电话
                // createTime:false,//填表时间
            },
            // rules: {
            //     // upOrganizationCode:[
            //     // { required: true, message: '请输入发放工资的法人单位组织机构代码', trigger: 'blur' },
            //     // { min: 9, max: 9, message: '长度为9个字符', trigger: 'blur' } 
            //     // ],
            //     //  upSocialCreditCode:[
            //     // { required: true, message: '请输入发放工资的法人单位统一社会信用代码', trigger: 'blur' },
            //     // { min: 18, max: 18, message: '长度为18个字符', trigger: 'blur' } 
            //     // ],
            //     // upUnitDetailedName: [
            //     // { required: true, message: '请输入发放工资的法人单位单位全称', trigger: 'blur' },
            //     // { min: 5, max: 30, message: '长度在 5 到 30 个字符', trigger: 'blur' }
            //     // ]
            // },
             rules: {
                totalCurrentAssets: [
                    { required: true, message: '请输入流动资产合计', trigger: 'none' },
                ],
                stock: [
                    { required: true, message: '请输入存货', trigger: 'none' },
                ],
                longTermInvestment: [
                    { required: true, message: '请输入长期投资', trigger: 'none' },
                ],
                fixedAssets: [
                    { required: true, message: '请输入固定资产原价', trigger: 'none' },
                ],
                housesStructures: [
                    { required: true, message: '请输入房屋和构筑物', trigger: 'none' },
                ],
                machineryEquipment: [
                    { required: true, message: '请输入机器设备', trigger: 'none' },
                ],
                conveyance: [
                    { required: true, message: '请输入运输工具', trigger: 'none' },
                ],
                electronicEquipment: [
                    { required: true, message: '请输入电子设备', trigger: 'none' },
                ],
                constructionProject: [
                    { required: true, message: '请输入在建工程', trigger: 'none' },
                ],
                culturalRelics: [
                    { required: true, message: '请输入文物文化资产', trigger: 'none' },
                ],
                intangibleAssets: [
                    { required: true, message: '请输入无形资产原价', trigger: 'none' },
                ],
                totalAssets: [
                    { required: true, message: '请输入资产总计', trigger: 'none' },
                ],
                totalDebt: [
                    { required: true, message: '请输入负债合计', trigger: 'none' },
                ],
                totalNetAssets: [
                    { required: true, message: '请输入净资产合计', trigger: 'none' },
                ],
                totalIncome: [
                    { required: true, message: '请输入本年收入合计', trigger: 'none' },
                ],
                donationIncome: [
                    { required: true, message: '请输入捐赠收入', trigger: 'none' },
                ],
                feeIncome: [
                    { required: true, message: '请输入会费收入', trigger: 'none' },
                ],
                totalExpenditure: [
                    { required: true, message: '请输入本年费用合计', trigger: 'none' },
                ],
                businessActivityCost: [
                    { required: true, message: '请输入业务活动成本', trigger: 'none' },
                ],
                activityPersonnelCosts: [
                    { required: true, message: '请输入人员费用', trigger: 'none' },
                ],
                activityDailyExpenses: [
                    { required: true, message: '请输入日常费用', trigger: 'none' },
                ],
                activityFixedAssetsDepreciation: [
                    { required: true, message: '请输入固定资产折旧', trigger: 'none' },
                ],
                activityTaxation: [
                    { required: true, message: '请输入税费', trigger: 'none' },
                ],
                managementCost: [
                    { required: true, message: '请输入管理费用', trigger: 'none' },
                ],
                // upOrganizationCode: [
                //     { required: true, message: '请输入组织机构代码', trigger: 'none' },
                // ],
                // upSocialCreditCode: [
                //     { required: true, message: '请输入统一社会信用代码', trigger: 'none' },
                // ],
                // upUnitDetailedName: [
                //     { required: true, message: '请输入单位详细名称', trigger: 'none' },
                // ],
                managementPersonnelCosts: [
                    { required: true, message: '请输入人员费用', trigger: 'none' },
                ],
                managementDailyExpenses: [
                    { required: true, message: '请输入日常费用', trigger: 'none' },
                ],
                managementFixedAssetsDepreciation: [
                    { required: true, message: '请输入固定资产折旧', trigger: 'none' },
                ],
                managementTaxation: [
                    { required: true, message: '请输入税费', trigger: 'none' },
                ],
                netAssetChange: [
                    { required: true, message: '请输入净资产变动额', trigger: 'none' },
                ],
                finalEmployeesNumber: [
                    { required: true, message: '请输入从业人员期末人数', trigger: 'none' },
                ],
                femaleNumber: [
                    { required: true, message: '请输入其中：女性人数', trigger: 'none' },
                ],
                averageEmployeesNumber: [
                    { required: true, message: '请输入从业人员平均人数', trigger: 'none' },
                ],
                // totalWages: [
                //     { required: true, message: '请输入从业人员工资总额', trigger: 'none' },
                // ],
                // reason: [
                //     { required: true, message: '请选择无法填报“从业人员工资总额”数据的原因', trigger: 'none' },
                // ],
                eBusinessProcurement: [
                    { required: true, message: '请输入电子商务采购额', trigger: 'none' },
                ],
             },
        }
    },
    mounted:function(){
        this.getDate();
    },
    methods:{
        getDate(){
            let self =this;
            let baseId=this.$store.get("companyId");
            console.log(baseId);
            this.$http({
                mothod:'get',
                url:'711Four/select?baseId='+baseId,
            }).then(function(res){
                console.log(res.data.length);
                if(res.status===200){
                    if(res.data.status===401){
                        self.$message.error("请先登录！");
                        self.$router.push({ path: '/' });
                        return;
                    }
                    if(res.data.length===0){
                        self.id =null;
                    }else{
                        if(res.data[0].totalWages || res.data[0].totalWages === 0){
                            self.totalReason = false;
                        }else{
                            self.totalReason = true;
                        }
                        self.form = res.data[0];
                        self.id = res.data[0].id;
                        self.sourceFilter(res.data[0].reason)
                        self.form.updateTime = res.data[0].newupdateTime;
                        
                    }
                }else{
                    self.$message.error(res.message);
                }
            }).catch(function(err){
                console.log(err)
            })
        },
        submitFormfour(formName){
            console.log(this.form.totalWages!=0);
            console.log(!this.form.totalWages);
            //判断合法输入
            if(this.form.totalWages || this.form.totalWages==='0'){
                this.saveData.reason = false;
                this.form.reason = null;
            }
             if(this.form.reason){
                this.saveData.reason = false;
            }
            if(this.form.reason!=2 && this.form.reason!=3){
                this.saveData.upOrganizationCode = false;
                this.saveData.upSocialCreditCode = false;
                this.saveData.upUnitDetailedName = false;
                this.form.upOrganizationCode = null;
                this.form.upSocialCreditCode = null;
                this.form.upUnitDetailedName = null;
            }
            for(var k in this.saveData){
                if(this.saveData[k] === true){
                    return;
                }
            }
            //判断必填
            if(!this.form.totalWages && this.form.totalWages!='0'){
                console.log(0);
                if(!this.form.reason){
                    this.saveData.reason = true;
                    return;
                }
            }
            if(this.form.reason===2 || this.form.reason===3){
                console.log(1);
                if(!this.form.upUnitDetailedName && this.form.upUnitDetailedName!='0'){
                    this.showupUnitDetailedName = true;
                    console.log(12);
                    return;
                }else if(!this.form.upSocialCreditCode && this.form.upSocialCreditCode!='0'){
                    if(!this.form.upOrganizationCode && this.form.upOrganizationCode!='0'){
                        this.showupSocialCreditCode = true;
                        console.log(1222);
                        return;
                    }
                }
            }
            this.$refs[formName].validate((valid) => {
            if (valid) {
            let self = this;
            let data = this.form;
            data.baseId= this.$store.get("companyId");
            data.id=this.id;
            data.state = 1;
            console.log(data);
            this.$http({
                method:'post',
                url:'711Four/submission',
                data:data,
            }).then(function(res){
                console.log(res);
                 if(res.status === 200){
                    self.$message.success(res.data.message);
                    self.form = res.data.data;
                    self.form.updateTime = res.data.data.newupdateTime;
                    self.$router.push({ path: '/home' })
                }else{
                    self.$message.error(res.data.message);
                }
            }).catch(function(err){
                console.log(err);
                
            })
            } else {
                return false;
            }
            });
        },
        //暂存
        saveFormfour(){
           //判断合法输入
            if(this.form.totalWages || this.form.totalWages=== 0){
                this.saveData.reason = false;
                this.form.reason = null;

            }
            
            if(this.form.reason!=2 && this.form.reason!=3){
                this.saveData.upOrganizationCode = false;
                this.saveData.upSocialCreditCode = false;
                this.saveData.upUnitDetailedName = false;
                this.form.upOrganizationCode = null;
                this.form.upSocialCreditCode = null;
                this.form.upUnitDetailedName = null;
            }
            for(var k in this.saveData){
            if(this.saveData[k] === true){
                return;
            }
            }
            let self = this;
            let data = this.form;
            data.baseId= this.$store.get("companyId");
            data.id=this.id;
            data.state = 0;
            console.log(data);
            this.$http({
                method:'post',
                url:'711Four/submission',
                data:data,
            }).then(function(res){
                console.log(res);
                 if(res.status === 200){
                    self.$message.success(res.data.message);
                    self.form = res.data.data;
                    self.form.updateTime = res.data.data.newupdateTime;
                    self.$router.push({ path: '/home' })
                }else{
                    self.$message.error(res.data.message);
                }
            }).catch(function(err){
                console.log(err);
                
            })
        },
        sourceFilter(label){
            console.log(label);
            if(label ===2 || label===3){
                this.one = true;
            }else{
                this.one = false;
            }
        },
           //检验输入金额
        testMoney(value,data){
            // let reg = /^(\d{1,11})+([.]{1}[0-9]{0,5})?$/;
            let reg =  /^(\-|\+?)\d{1,15}(\.\d{1,5})?$/;
            if(!reg.test(value) && value){
                for(var r in this.saveData){
                if(r === data){
                    this.saveData[r] = true;
                }
                }
            }else if(reg.test(value) || !value){
                for(var rs in this.saveData){
                if(rs === data){
                    this.saveData[rs] = false;
                }
                }
            }
        },
        //检验输入人数
        testPeople(value,data){
            let reg = /^(\d{1,11})$/;
            if(!reg.test(value) && value){
                for(var r in this.saveData){
                if(r === data){
                    this.saveData[r] = true;
                }
                }
            }else if(reg.test(value) || !value){
                for(var rs in this.saveData){
                if(rs === data){
                    this.saveData[rs] = false;
                }
                }
            }
        },
         //下载pdf
        download(){
            let self = this;
            let data = this.formData;
            console.log(data.state);
            if(data.state === 2){
                console.log(555555555555555555);
                //  let url = 'http://192.168.0.131:8001/register/711Base/downLoad?baseId='+this.$store.get("companyId");
            let url = this.$downloadUrl+'/711Four/downLoad?baseId='+this.$store.get("companyId");
            window.location.href=url;
            }else{
                this.$message.error('有未提交表不能下载');
            }
        },
         //检验组织机构代码，社会信用代码
        testEln(value,data){
            console.log("1111");
            let reg = /^[a-zA-Z0-9]*$/;
            if(!reg.test(value) && value){
                    this.saveData[data] = true;
            }else if(reg.test(value) || !value){
                    this.saveData[data] = false;
            }
        },
        // 检验是否填总额原因
        testReason(value){
            console.log(value);
            if(value || value === 0){
                this.totalReason = false;
            }else{
                this.totalReason = true;
            }
        },
    }          
}
</script>
<style scoped>
     #main input{
        border:0px solid #dcdfe6;
        border-bottom: 1px solid #1d1e20;
        border-radius: 0;
    }
    .width400{
        width: 400px;
    }
     #main table tr,#main table td,#main table th{
        /* border-right: 1px solid #ddd; */
        /* border-left: 1px solid #ddd; */
        border-bottom: 1px solid #DDD;
        border-top: 1px solid #DDD;
    }
    .bian{
        border-right: 1px solid #ddd;
    }
    .dialog-footer{
        text-align: center
    }
    .doubling{
        border-right: 1px solid #ddd;
        border-left: 1px solid #ddd;
        text-align: left;
    }
    .bbb{
        text-align: left;
        border-right: 1px solid #ddd;
    }
</style>

